source("Library Installer.R")
Preparing your computer
Make sure you have downloaded RStudio from the IMF software center.
Start RStudio.
Click on File, New Project. The following dialogue will pop up:
Click on New Directory. Pick create new project. Fill in like below.
You now get the following screen. Click on new folder (highlighted in yellow):
Create two folders: databases and figures
Copy the following files from \\was.int.imf.org\ecn\ems_shared\pub\R-tutorial into your overall IMF_R_Tutorial folder:
Library Installer R file
Library List text tile
All the contents of the database folder into your database folder
The Utils folder and its contents
Your project directory should now look like this:
Once all of these contents have been copied to your folder, double-click on your Library Installer.R script, or navigate to it via the files tab directly in R studio.
This script automatically reads the list of required libraries from the library list text document and installs them. The script will also automatically install the internal bookr library we have created.
Run the script by typing this command in the R console and pressing enter.
This process will take some time, but your console will display the following message when completed, “Setup complete.”
Here’s a brief overview of the project directory structure and what each folder is for:
Databases/
: This folder contains database files used in the tutorial.Figures/
: Generated figures and plots will be saved here.Utils/
: Utility scripts and functions that are used across different analyses are stored in this folder.
You are now set to follow the code.